/*
 * sysmo 服务器任何（包括新的和已被加入监控列表的）客户端（节点）信息
 * Copyright (C) 2009  YuLicheng
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package org.sysmo.server.node;

/**
 *
 * 任何类型的客户端（节点）信息模块。每个类实例对应于一个被监控的节点。
 * 此类是所有节点类型的抽象父类。
 *
 * @author YuLicheng
 */
public abstract class Node {

    /**
     * 当节点状态改变涉及到外部世界时（如节点的增加、删除或类型的变迁），
     * 使用此接口通知sysmo 服务器核心等外部逻辑。
     */
    protected NodeStateChangeListener stateListener;

    /**
     * 构造函数保存了节点状态的回调接口。
     *
     * @param stateListener 节点状态改变回调接口。
     */
    public Node(NodeStateChangeListener stateListener) {
        this.stateListener = stateListener;
    }
}
